﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<WRSManagementSystem.DomainModel.Entities.Person>>" %>
<%@ Import Namespace="WRSManagementSystem.DomainModel.Entities" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Ludzie
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Ludzie</h2>

    <table>
        <tr>
            <th></th>
            <th>
                Foto
            </th>
            <th>
                Imię
            </th>
            <th>
                Nazwisko
            </th>
            <th>
                Telefon
            </th>
            <th>
                E-mail
            </th>
        </tr>

    <%
        foreach (Person item in Model)
        {%>
    
        <tr>
            <td>
                <%=Html.ActionLink("Edytuj", "../People/Edit", new {id = item.Id})%> |
                <%=Html.ActionLink("Szczegóły", "../People/Details", new {id = item.Id})%>
            </td>
           <%-- <td>
                <%= Html.Encode(item.Id) %>
            </td>--%>
            <td>
              <img width="100" height="100" alt="." src="../../foto/<%=item.FotoFoto %>"/>
            </td>
            <td>
                <%=Html.Encode(item.Name)%>
            </td>
            <td>
                <%=Html.Encode(item.Surname)%>
            </td>
            <td>
                <%=Html.Encode(item.Phone.PhoneNumber)%>
            </td>
            <td>
                <%=Html.Encode(item.Email.mail)%>
            </td>
        </tr>
    
    <%
        }%>

    </table>

    <p>
        <%=Html.ActionLink("Utwórz nowego użytkownika", "../People/Create")%>
    </p>

</asp:Content>

